package com.gitee.wsl.db.dsl.operation

class QOP private constructor() {
    var queryOperation: QueryOperation = QueryOperation()

    fun order(field: String?): QOP {
        queryOperation.order(field)
        return this
    }

    fun order(field: String?, asc: Boolean): QOP {
        queryOperation.order(field, asc)
        return this
    }

    fun page(start: Int, length: Int): QueryOperation {
        queryOperation.page(start, length)
        return queryOperation
    }

    fun build(): QueryOperation {
        return queryOperation
    }

    companion object {
        fun c(): QOP {
            return QOP()
        }
    }
}
